<template>
   <div class="cbox">
        <div class="header">
            <span>{{title}}</span>
        </div>
        <div class="main">
            <ul>
                <li v-for="(item,index) in items" :key="index">
                   <slot :item="item">{{item.name}}</slot>
                </li>
            </ul>
        </div>
   </div>
</template>

<script>
export default {
    props:['title','items']
}
</script>

<style lang="scss">
    .cbox{
        display: flex;
        flex-direction: column;
        width: 215px;
        height: 300px;
        border: 1px solid #ccc;
        border-radius: 5px;
        .header{
            display: flex;
            align-items: center;
            margin-left: 5px;
            font-size: 18px;
            font-weight: bold;
            height: 35px;
            border-bottom: 1px dashed #ccc;
        }
        li{
            line-height: 32px;
        }
        .main{
            flex-grow: 1;
        }
    }
</style>